home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-26 | 1.4 KB | 67 lines | [TEXT/CWIE] |
-
- // mail <chelly@eden.com> or surf http://www.eden.com/~chelly for feedback
- // free source code - do whatever you like with it
-
- // common stuff that must be included in source files (especially on windows)
-
- #ifndef common_H
- #define common_H
-
- // Find operating system we're compiling for
-
- // Macintosh
- #if defined __MWERKS__
- #define TARGET_IS_MACOS 1
-
- // Windows
- #elif defined _MSC_VER
- #define TARGET_IS_WIN95 1
-
- // One we don't know of
- #else
- #error Unknown operating system
-
- #endif
-
- // nil - gotta feel at home
- #include <stddef.h>
- #ifndef nil
- #define nil NULL
- #endif
-
- // definite-sized types, in bits
- typedef signed char int8;
- typedef unsigned char uint8;
- typedef signed short int16;
- typedef unsigned short uint16;
- typedef signed long int32;
- typedef unsigned long uint32;
-
- // assertions make safer programming
- #include <assert.h>
-
- // neato cool assertion that can be at the top level of a source file,
- // inside a class, or in a function... WOW!!!
- // no overhead because it's evaluated and checked at compile time instead
- // of run time
- // because of this, condition must be a constant expression
- #define assert_anywhere( expr ) struct { int array [(expr) ? 1 : -1]; }
-
- #if TARGET_IS_WIN95
-
- #include <afxwin.h> // MFC core and standard components
- #include <afxext.h> // MFC extensions (including VB)
- #include <mmsystem.h>
-
- enum
- {
- UM_SPENDTIME = WM_USER
- };
-
- #endif
-
- #include "preload.h"
-
- #endif
-
-